//
//  XPPAutoCompleteHelper.h
//  XPPXcodePlugin
//
//  Created by yoyokko on 10-9-5.
//  Copyright 2010 yoyokko@gmail.com. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "XCSourceCodeTextView.h"

@class PBXFileReference, PBXExtendedOutlineView, PBXGroup;

@interface XPPAutoCompleteHelper : NSObject {
	NSMutableDictionary *prefixAndTextDictionary_;
	NSMutableDictionary *prefixAndCousorDictionary_;
	
	PBXExtendedOutlineView *projectGroupOutlineView_;
	
}
@property (nonatomic, retain) NSMutableDictionary	*prefixAndTextDictionary;
@property (nonatomic, retain) NSMutableDictionary	*prefixAndCousorDictionary;
@property (nonatomic, retain) PBXExtendedOutlineView *projectGroupOutlineView;

+ (id) sharedXPPAutoCompleteHelper;

- (void) fun;

- (PBXExtendedOutlineView *) theProjectGroupOutlineView;
- (PBXExtendedOutlineView *) getTheProjectGroupsOutlineView:(NSView *) rootView;
- (PBXGroup *) rootGroupOfContext;
- (PBXFileReference *) implementationFileForFileName:(NSString *) headerFileName 
								  inRootGroupContext:(PBXGroup *) rootGroupContext;
- (BOOL) isVariableHasProperty:(NSString *) variableName 
					 className:(NSString *) className
					   forFile:(NSString *) headerFileName;

- (void) loadXcodeKeyTextFile;
- (void) processXCodeKeyTextDictionary:(NSDictionary *)keyTextDict;
- (NSString *) textForPrefix:(NSString *) prefix;
- (int) cousorIndexForPrefix:(NSString *) prefix;
- (PBXFileReference *) implementationFileForHeader:(PBXFileReference *) headerReference;
- (NSArray *) classNamesInSourceFile:(PBXFileReference *) fileReference;

- (void)autoCompletePropertySynthesizeForVariableName:(NSString *)variableName 
										 variableType:(NSString*)variableType 
										  inClassName:(NSString *)className 
								 inSourceCodeTextView:(XCSourceCodeTextView*)sourceCodeTextView 
											  isPoint:(BOOL)isPoint;



@end
